const mongoose = require('mongoose');
const roomSchema = new mongoose.Schema({
    name: {
        type: String,
        required: true,
        comment:'房间名称'
    },
    roomNumber: {
        type: String,
        required: true,
        comment:'房间号'
    },
    activeStatus: {
        type: String,
        default:'0',
        comment:'营业状态 （空闲/0 有客/1 整备中/3 已预定/4）'
    },
    price: {
        type: String,
        required: true,
        comment:'房间价格'
    },
    status: {
        type: String,
        required: true,
        default:'1',
        comment:'状态 0/禁用 1/启用'
    },
    describe:{
        type: String,
        required: true,
        comment:'房间描述'
    },
    imageUrls: {
        type: [String],
        required: true,
        comment:'房间照片 默认首图第0张'
    },
    created_at: {
        type: Date,
        default: Date.now,
    },
    updated_at: {
        type: Date,
        default: Date.now,
    }
});

const Room = mongoose.model('Room', roomSchema);
module.exports = Room;